
const map = new Map()

function rangeStr() {
  const str = Array.from({ length: Math.random() * 10 + 1 })
    .map(() => String.fromCharCode((64 + Math.random() * 24) | 1))
    .join('')

  if (map.has(str)) {
    return rangeStr()
  }
  map.set(str, true)
  return str
}

export default rangeStr
